Please, am stock with my loggin, with flask version 0.12.2 and python 3.5
# This is the login handler @app.route('/login/', methods = ['GET','POST']) def login_page(): error = '' try: c, conn = connection() if request.method == "POST": data = c.execute("SELECT * FROM users WHERE username = (%s)", kill(request.form['username'])) data = c.fetchone()[2]
if sha256_crypt.verify(request.form['password'], data): session['loggin_in'] = True session['username'] = request.form['username']